Skip to content

fix(cli): prevent repeated updates and npm cache growth - #45091

Merged
neriousy merged 3 commits into
v2from
updater-cache-loop
Aug 27, 2026
Merged

fix(cli): prevent repeated updates and npm cache growth#45091
neriousy merged 3 commits into
v2from
updater-cache-loop

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remember the last successfully installed version so long-running services do not reinstall the same release every ten minutes
  • install npm updates with a scoped temporary cache that is removed after the update, matching the existing Bun behavior
  • cover already-installed updates while preserving upgrades to newer releases
  • exercise repeated checks through the real updater service in an isolated subprocess, with update requests and installs stubbed

Fixes #45087

Verification

  • bun test src/services/updater.test.ts (14 passing)
  • regression test fails with three installs instead of one when the successful-install state update is removed, and passes with the fix restored
  • GOMAXPROCS=2 bun typecheck --singleThreaded
  • bun x prettier --check src/services/updater.ts src/services/updater-action.ts src/services/updater.test.ts src/services/fixtures/updater.ts

Requested by: @neriousy (Filip via Slack)

@neriousy
neriousy merged commit b20748f into v2 Aug 27, 2026
10 checks passed
@neriousy
neriousy deleted the updater-cache-loop branch August 27, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant